#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

int is_leap_year(int x)
{
    if (x % 4 == 0)
    {
        if ((x % 100 == 0) && (x % 400 != 0))
        {
            return 0;
        }
        else
        {
            return 1;
        }
    }
    else
        return 0;
}

int main()
{
    int count = 0;
    int y = 0;
    for (y = 1000; y <= 2000; y++)
    {
        if (is_leap_year(y) == 1)
        {
            count++;
            printf("%d ", y);
        }
    }
    printf("\ncount=%d", count);

    return 0;

}